//---------------------------------------------------------------------------

#ifndef DPCnsSrvH
#define DPCnsSrvH
//---------------------------------------------------------------------------
#include "DPCnsMCI.h"
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "DialPad.h"
#include "DPGrfSrv.h"
#include "PHDS.h"
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include "PHGridEd.h"
#include <Grids.hpp>
#include "PHCheck.h"
#include "PHCombo.h"
#include "PHEdit.h"
#include "PHLabel.h"
#include "DMCli.h"
#include "StDMCli.h"
#include "DIALPAD.h"
//---------------------------------------------------------------------------
class TDPCnsSrv1 : public TDiPad
{
__published:	// IDE-managed Components
 TBitBtn *BitBtn1;
 TBitBtn *BitBtn2;
 TBitBtn *BitBtn3;
 PHDataSource *DSCnsServ;
 PHGridEdit *PHGridEdit1;
 TBitBtn *BitBtnSel1;
 TBevel *Bevel1;
 TGroupBox *GroupBox1;
 TLabel *Label1;
 PHLabel *PHLabel1;
 PHEdit *PHEdit1;
 PHLabel *PHLabel2;
 PHEdit *PHEdit2;
 PHLabel *PHLabel3;
 PHCheckBox *PHCheckBox1;
 TBitBtn *BitBtn5;
 TBevel *Bevel2;
 TGroupBox *GroupBox2;
 TLabel *Label2;
 PHComboBox *PHComboBox2;
 TBitBtn *BitBtn4;
 void __fastcall BitBtn2Click(TObject *Sender);
 void __fastcall BitBtn1Click(TObject *Sender);
 void __fastcall BitBtnSel1Click(TObject *Sender);
 void __fastcall BitBtn5Click(TObject *Sender);
 void __fastcall PHCheckBox1Click(TObject *Sender);
 void __fastcall PHComboBox2Change(TObject *Sender);
 void __fastcall PHGridEdit1DrawGridCell(int Row, int Col,
          TColor &CorTexto, TColor &CorFundo, bool &AplicarCoresSelecao,
          PHDataSource *PHDS, AnsiString &Conteudo);
 void __fastcall BitBtn3Click(TObject *Sender);
 void __fastcall BitBtn4Click(TObject *Sender);
 void __fastcall PHEdit1Change(TObject *Sender);
 void __fastcall PHEdit2Change(TObject *Sender);
 void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
 void __fastcall PHCheckBox2Click(TObject *Sender);
private:	// User declarations
 void __fastcall Processamento(TObject *Sender);
 void __fastcall ProcessaServicos(void);
 void __fastcall LimpaGrid(void);
 bool __fastcall VerificaServicos(void);
 bool __fastcall ProcessaTotais(void);
 void __fastcall AjustaFiltro(void);
 void __fastcall ProcessaGrafico(TObject *Sender);
 TDPCnsMCI1* User;
 TLista*  ListCliente;
 TStringList*  ListaClientes;
 TStringList*  ListaServicos;
 TLista*  ListServicos;
 PHDataSource *DSDet;
public:		// User declarations
 __fastcall TDPCnsSrv1(TComponent* Owner);
  struct CNSRV *stcnsrv;
  double ValorTotalRecRel;
  double ValorTotalFatRel;
  double ValorCaixaRecRel;
};
//---------------------------------------------------------------------------
extern PACKAGE TDPCnsSrv1 *DPCnsSrv1;
//---------------------------------------------------------------------------
#endif
